home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-11-08 | 5.8 KB | 166 lines | [TEXT/KAHL] |
- //------------------------- © 1994-1995 by James G. Stout ----------------------
- // File : jimsCDEF.h
- // Date : September 24, 1994
- // Author : Jim Stout
- // Purpose : Various #defines and structs useful with jim's CDEF's
- // -----------------------------------------------------------------------------
-
- // -----------------------------------------------------------------------------
- // the resource id's for the CDEFS
- // -----------------------------------------------------------------------------
- #define groupBox 1100
- #define popUp 1101
- #define spinner 1102
- #define dateTime 1103
- #define togCDEF 1104
- #define hSlider 1105
- #define vSlider 1106
- #define button3D 1107
- #define progBar 1108
- #define tabPanel 1109
- #define slider 1110
- #define rectButton 1111
- #define grayButton 1112
-
- // -----------------------------------------------------------------------------
- // varCodes for all CDEFS
- // -----------------------------------------------------------------------------
-
- #define ctl3D 0x0002 // 3D control appearance
- #define useWFont 0x0008 // draw control with window font
- // -----------------------------------------------------------------------------
- // varCodes for GroupBox CDEF
- // -----------------------------------------------------------------------------
- #define grayLine 0x0001 // gray pattern box
- #define insetBox 0x0004 // a 3D, inset box (must have non-white bg)
-
- // -----------------------------------------------------------------------------
- // varCodes for popUp CDEF
- // -----------------------------------------------------------------------------
-
- #ifndef popupTitleLeftJust
-
- // special meanings for contrlValue field
-
- #define popupTitleLeftJust 0x0000
- #define popupTitleCenterJust 0x0001
- #define popupTitleRightJust 0x00FF
-
- // variation codes
-
- #define popupFixedWidth 0x0001
- #define popupUseAddResMenu 0x0004
- #define popupUseWFont 0x0008
-
- #endif
-
- // extended variation codes if combined with contrlMax field
-
- #define popupNoTitle 0x0000
- #define popupNoMark 0x0100
- #define popupInsetFrame 0x0200
- #define popupBlackSymbol 0x0400
- #define popupSymbolOnly 0x0800
- #define popupNoSymbol 0x1000
- #define popupIconOnly 0x2000
- #define popupCenterText 0x4000
- #define popupNoDeleteMenu 0x8000
-
- // -----------------------------------------------------------------------------
- // varCodes for spinner CDEF
- // -----------------------------------------------------------------------------
-
- #define bigArrows 0x0001
- #define horizArrows 0x0004
-
- #define aHt 20 // minimum height & width for arrows
- #define aWid 13
- #define aHtBig 27
- #define aWidBig 17
-
- // -----------------------------------------------------------------------------
- // varCodes for dateTime CDEF
- // -----------------------------------------------------------------------------
-
- #define dateOnly 0x0001 // show date, left justified in control rect
- #define timeOnly 0x0002 // show time, right justified in control rect
- #define dtStack 0x0004 // show both on 2 lines, date then time
-
- #define only24 1 // for Max, sets dateTime CDEF to 24 hour display
-
- // -----------------------------------------------------------------------------
- // varCodes for hSlider CDEF
- // -----------------------------------------------------------------------------
-
- #define scaleNoFill 0x0001
- #define scaleGray 0x0004
-
- #define hHt 24
- #define hWid 121
-
- // -----------------------------------------------------------------------------
- // varCodes for vSlider CDEF
- // -----------------------------------------------------------------------------
-
- #define scaleNoFill 0x0001
- #define thumbNoSnap 0x0004
- #define scaleBlank 0x0008
-
- #define vHt 12
- #define vWid 105
-
- // -----------------------------------------------------------------------------
- // varCodes for button3D CDEF
- // -----------------------------------------------------------------------------
-
- #define useWBG 0x0004 // draw 3D push button with back color
-
- // -----------------------------------------------------------------------------
- // varCodes for progBar CDEF
- // -----------------------------------------------------------------------------
-
- #define vertBar 0x0001
- #define roundBar 0x0002
- #define barberPole 0x0004
-
- // -----------------------------------------------------------------------------
- // varCodes for tabPanel CDEF
- // -----------------------------------------------------------------------------
-
- #define sysFontTabs 0x0001
- #define oneTabRow 0x0002
-
- // -----------------------------------------------------------------------------
- // varCodes for slider CDEF
- // -----------------------------------------------------------------------------
-
- #define narrowScale 0x0001 // scale is 4 pixels smaller than control Rect
- #define narrowScale2 0x0002 // scale is 8 pixels smaller
- #define filledScale 0x0004 // scale filled with cTingeDark
- #define snapToScale 0x0008 // click on scale moves thumb to that point
-
- #ifndef REZ // Think6 Rez doesn't like the following
- //------------------------------------------------------------------------------
- // Spinner CDEF private data structure
- // increment and DITL itemNum are passed into the control as
- // LoWord & HiWord of the control RefCon
- //------------------------------------------------------------------------------
-
- typedef struct {
- short increment; // initial, requested increment value
- short itemNum; // DITL editText item number for call to SetIText
- long userData; // user supplied data
- }Spin,*SpinPtr,**SpinHandle;
-
- //------------------------------------------------------------------------------
- // Popup Menu CDEF private data structure
- // N.B. : The following structure is NOT the same as Apple's.
- // It does match, for the first 2 elements.
- //------------------------------------------------------------------------------
-
- typedef struct{
- MenuHandle mHandle; // handle to the menu
- int mId; // resource id of menu
- }popUpPrivateData,**popUpPrivateDataH;
-
- #endif // REZ